import request from "./request_app.js";

export const programlogin = (params) => {
  return request("wechat/authorize/program/login?code=" + params.code, params, "post");
};
export function phoneAndPassword(data) {
  return request("wechat/register/binding/phoneAndPassword", data, "post");
}
// 获取登录信息
export function getUserInfo(data) {
  return request("user", data, "get");
}
/**
 * 用户发送验证码
 * @param data object 用户手机号
 */
export function registerVerify(data) {
  return request("sendCode", data, "post", { header: { "Content-Type": "multipart/form-data" } });
}
export function getUserPhoneNumber(params) {
  return request("wechat/business/getuserphonenumber?code=" + params.code, params, "get");
}
/* 提现申请 */

export function transferToUsers(data) {
  return request("wechatToUser/transferToUser", data, "put");
}
/* 提现记录 */
export function transferToUserList(params) {
  return request("wechatToUser/list", params, "get");
}
/* 累计提现 */
export function transferToUserSum(params) {
  return request("wechatToUser/listSum", params, "get");
}
/* 提现状态 */

export function transConfirmOrCancel(data) {
  return request("wechatToUser/transferToUserConfirmOrCancel", data, "post");
}
/* 新用户赠送消费补贴 */
export function newUserIntegral(data) {
  return request("wechat/register/give/newUserIntegral", data, "post");
}
/* 平台积分拆分-领取 */
export function receiveCode(data) {
  return request("system/comunityIntegralSharecode/receiveCode", data, "put");
}
/* 用户签到-签到列表 */
/* export function qdlist(params) {
  return request("sign/user/list", params, "get");
}  */

/* 用户签到-签到周期 */
export function qddatelist(id) {
  return request("sign/user/getSignRuleAndAwardList/" + id, {}, "get");
}

/* 用户签到-签到 */
export function addQd(data) {
  return request("sign/user/sign", data, "post");
}
/* 获取二维码 */
export function getQrcode(params) {
  return request("wechat/wxa/getwxacode" , params, "get");
}